(0) Obligation:

Clauses:

bin_tree(void).
bin_tree(tree(X1, Left, Right)) :- ','(bin_tree(Left), bin_tree(Right)).

Query: bin_tree(g)

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph DT10.

(2) Obligation:

Triples:

pB(void, X1) :- bin_treeA(X1).
pB(tree(X1, X2, X3), X4) :- bin_treeA(X2).
pB(tree(X1, X2, X3), X4) :- ','(bin_treecA(X2), pB(X3, X4)).
bin_treeA(tree(X1, X2, X3)) :- pB(X2, X3).

Clauses:

bin_treecA(void).
bin_treecA(tree(X1, X2, X3)) :- qcB(X2, X3).
qcB(void, X1) :- bin_treecA(X1).
qcB(tree(X1, X2, X3), X4) :- ','(bin_treecA(X2), qcB(X3, X4)).

Afs:

bin_treeA(x1)  =  bin_treeA(x1)

(3) TriplesToPiDPProof (SOUND transformation)

We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes:
bin_treeA_in: (b)
pB_in: (b,b)
bin_treecA_in: (b)
qcB_in: (b,b)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

BIN_TREEA_IN_G(tree(X1, X2, X3)) → U5_G(X1, X2, X3, pB_in_gg(X2, X3))
BIN_TREEA_IN_G(tree(X1, X2, X3)) → PB_IN_GG(X2, X3)
PB_IN_GG(void, X1) → U1_GG(X1, bin_treeA_in_g(X1))
PB_IN_GG(void, X1) → BIN_TREEA_IN_G(X1)
PB_IN_GG(tree(X1, X2, X3), X4) → U2_GG(X1, X2, X3, X4, bin_treeA_in_g(X2))
PB_IN_GG(tree(X1, X2, X3), X4) → BIN_TREEA_IN_G(X2)
PB_IN_GG(tree(X1, X2, X3), X4) → U3_GG(X1, X2, X3, X4, bin_treecA_in_g(X2))
U3_GG(X1, X2, X3, X4, bin_treecA_out_g(X2)) → U4_GG(X1, X2, X3, X4, pB_in_gg(X3, X4))
U3_GG(X1, X2, X3, X4, bin_treecA_out_g(X2)) → PB_IN_GG(X3, X4)

The TRS R consists of the following rules:

bin_treecA_in_g(void) → bin_treecA_out_g(void)
bin_treecA_in_g(tree(X1, X2, X3)) → U7_g(X1, X2, X3, qcB_in_gg(X2, X3))
qcB_in_gg(void, X1) → U8_gg(X1, bin_treecA_in_g(X1))
U8_gg(X1, bin_treecA_out_g(X1)) → qcB_out_gg(void, X1)
qcB_in_gg(tree(X1, X2, X3), X4) → U9_gg(X1, X2, X3, X4, bin_treecA_in_g(X2))
U9_gg(X1, X2, X3, X4, bin_treecA_out_g(X2)) → U10_gg(X1, X2, X3, X4, qcB_in_gg(X3, X4))
U10_gg(X1, X2, X3, X4, qcB_out_gg(X3, X4)) → qcB_out_gg(tree(X1, X2, X3), X4)
U7_g(X1, X2, X3, qcB_out_gg(X2, X3)) → bin_treecA_out_g(tree(X1, X2, X3))

Pi is empty.
We have to consider all (P,R,Pi)-chains

Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES

(4) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

BIN_TREEA_IN_G(tree(X1, X2, X3)) → U5_G(X1, X2, X3, pB_in_gg(X2, X3))
BIN_TREEA_IN_G(tree(X1, X2, X3)) → PB_IN_GG(X2, X3)
PB_IN_GG(void, X1) → U1_GG(X1, bin_treeA_in_g(X1))
PB_IN_GG(void, X1) → BIN_TREEA_IN_G(X1)
PB_IN_GG(tree(X1, X2, X3), X4) → U2_GG(X1, X2, X3, X4, bin_treeA_in_g(X2))
PB_IN_GG(tree(X1, X2, X3), X4) → BIN_TREEA_IN_G(X2)
PB_IN_GG(tree(X1, X2, X3), X4) → U3_GG(X1, X2, X3, X4, bin_treecA_in_g(X2))
U3_GG(X1, X2, X3, X4, bin_treecA_out_g(X2)) → U4_GG(X1, X2, X3, X4, pB_in_gg(X3, X4))
U3_GG(X1, X2, X3, X4, bin_treecA_out_g(X2)) → PB_IN_GG(X3, X4)

The TRS R consists of the following rules:

bin_treecA_in_g(void) → bin_treecA_out_g(void)
bin_treecA_in_g(tree(X1, X2, X3)) → U7_g(X1, X2, X3, qcB_in_gg(X2, X3))
qcB_in_gg(void, X1) → U8_gg(X1, bin_treecA_in_g(X1))
U8_gg(X1, bin_treecA_out_g(X1)) → qcB_out_gg(void, X1)
qcB_in_gg(tree(X1, X2, X3), X4) → U9_gg(X1, X2, X3, X4, bin_treecA_in_g(X2))
U9_gg(X1, X2, X3, X4, bin_treecA_out_g(X2)) → U10_gg(X1, X2, X3, X4, qcB_in_gg(X3, X4))
U10_gg(X1, X2, X3, X4, qcB_out_gg(X3, X4)) → qcB_out_gg(tree(X1, X2, X3), X4)
U7_g(X1, X2, X3, qcB_out_gg(X2, X3)) → bin_treecA_out_g(tree(X1, X2, X3))

Pi is empty.
We have to consider all (P,R,Pi)-chains

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 4 less nodes.

(6) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

BIN_TREEA_IN_G(tree(X1, X2, X3)) → PB_IN_GG(X2, X3)
PB_IN_GG(void, X1) → BIN_TREEA_IN_G(X1)
PB_IN_GG(tree(X1, X2, X3), X4) → BIN_TREEA_IN_G(X2)
PB_IN_GG(tree(X1, X2, X3), X4) → U3_GG(X1, X2, X3, X4, bin_treecA_in_g(X2))
U3_GG(X1, X2, X3, X4, bin_treecA_out_g(X2)) → PB_IN_GG(X3, X4)

The TRS R consists of the following rules:

bin_treecA_in_g(void) → bin_treecA_out_g(void)
bin_treecA_in_g(tree(X1, X2, X3)) → U7_g(X1, X2, X3, qcB_in_gg(X2, X3))
qcB_in_gg(void, X1) → U8_gg(X1, bin_treecA_in_g(X1))
U8_gg(X1, bin_treecA_out_g(X1)) → qcB_out_gg(void, X1)
qcB_in_gg(tree(X1, X2, X3), X4) → U9_gg(X1, X2, X3, X4, bin_treecA_in_g(X2))
U9_gg(X1, X2, X3, X4, bin_treecA_out_g(X2)) → U10_gg(X1, X2, X3, X4, qcB_in_gg(X3, X4))
U10_gg(X1, X2, X3, X4, qcB_out_gg(X3, X4)) → qcB_out_gg(tree(X1, X2, X3), X4)
U7_g(X1, X2, X3, qcB_out_gg(X2, X3)) → bin_treecA_out_g(tree(X1, X2, X3))

Pi is empty.
We have to consider all (P,R,Pi)-chains

(7) PiDPToQDPProof (EQUIVALENT transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(8) Obligation:

Q DP problem:
The TRS P consists of the following rules:

BIN_TREEA_IN_G(tree(X1, X2, X3)) → PB_IN_GG(X2, X3)
PB_IN_GG(void, X1) → BIN_TREEA_IN_G(X1)
PB_IN_GG(tree(X1, X2, X3), X4) → BIN_TREEA_IN_G(X2)
PB_IN_GG(tree(X1, X2, X3), X4) → U3_GG(X1, X2, X3, X4, bin_treecA_in_g(X2))
U3_GG(X1, X2, X3, X4, bin_treecA_out_g(X2)) → PB_IN_GG(X3, X4)

The TRS R consists of the following rules:

bin_treecA_in_g(void) → bin_treecA_out_g(void)
bin_treecA_in_g(tree(X1, X2, X3)) → U7_g(X1, X2, X3, qcB_in_gg(X2, X3))
qcB_in_gg(void, X1) → U8_gg(X1, bin_treecA_in_g(X1))
U8_gg(X1, bin_treecA_out_g(X1)) → qcB_out_gg(void, X1)
qcB_in_gg(tree(X1, X2, X3), X4) → U9_gg(X1, X2, X3, X4, bin_treecA_in_g(X2))
U9_gg(X1, X2, X3, X4, bin_treecA_out_g(X2)) → U10_gg(X1, X2, X3, X4, qcB_in_gg(X3, X4))
U10_gg(X1, X2, X3, X4, qcB_out_gg(X3, X4)) → qcB_out_gg(tree(X1, X2, X3), X4)
U7_g(X1, X2, X3, qcB_out_gg(X2, X3)) → bin_treecA_out_g(tree(X1, X2, X3))

The set Q consists of the following terms:

bin_treecA_in_g(x0)
qcB_in_gg(x0, x1)
U8_gg(x0, x1)
U9_gg(x0, x1, x2, x3, x4)
U10_gg(x0, x1, x2, x3, x4)
U7_g(x0, x1, x2, x3)

We have to consider all (P,Q,R)-chains.

(9) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • PB_IN_GG(tree(X1, X2, X3), X4) → U3_GG(X1, X2, X3, X4, bin_treecA_in_g(X2))
    The graph contains the following edges 1 > 1, 1 > 2, 1 > 3, 2 >= 4

  • BIN_TREEA_IN_G(tree(X1, X2, X3)) → PB_IN_GG(X2, X3)
    The graph contains the following edges 1 > 1, 1 > 2

  • U3_GG(X1, X2, X3, X4, bin_treecA_out_g(X2)) → PB_IN_GG(X3, X4)
    The graph contains the following edges 3 >= 1, 4 >= 2

  • PB_IN_GG(void, X1) → BIN_TREEA_IN_G(X1)
    The graph contains the following edges 2 >= 1

  • PB_IN_GG(tree(X1, X2, X3), X4) → BIN_TREEA_IN_G(X2)
    The graph contains the following edges 1 > 1

(10) YES